/*
 * Created: Author: Aléx Carvalho / Date: Feb 10, 2015
 * 
 * Changed: $Author: ac280593@gmail.com $ / $Date: 2015-05-06 00:26:37 +0000 (Wed, 06 May 2015) $
 */
package com.cpm.repository.jpa;

import com.cpm.entities.Identity;
import com.cpm.repository.GenericCrudRepository;
import javax.transaction.Transactional;

public class GenericCrudRepositoryJpa<IDENTITY extends Identity> extends GenericRepositoryJpa<IDENTITY> implements GenericCrudRepository<IDENTITY> {

    @Transactional
    @Override
    public void remove(IDENTITY value) {
        preRemove(value);

        entityManager.remove(value);

        postRemove(value);
    }

    public void preRemove(IDENTITY value) {
        System.out.println("preRemove");
    }

    public void postRemove(IDENTITY value) {
        System.out.println("postRemove");
    }
}
